<!DOCTYPE html>
<html>
<head>
<base href="{$site_url}/" />
<!-- Use IE7 mode -->
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>调箱平台-日放箱申请</title>
<meta name="description" content="普捷通" />
<meta name="keywords" content="普捷通|要箱|集港|疏港" />
<script type="text/javascript">
	//<!CDATA[
	var SITE_URL = "{$site_url}";
	var REAL_SITE_URL = "{$real_site_url}";
	var PRICE_FORMAT = '{$price_format}';
	//
</script>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link href="{res file=css/base.css}" rel="stylesheet" type="text/css" />
<link href="{res file=css/index.css}" rel="stylesheet" type="text/css" />
<link href="{res file=css/jquery.datetimepicker.css}" rel="stylesheet"
	type="text/css" />
	<link href="{res file=css/jquery-ui.min.css}" rel="stylesheet"
	type="text/css" />
<script type="text/javascript" src="index.php?act=jslang"></script>
<script type="text/javascript" src="{lib file=jquery-1.8.3.min.js}"
	charset="utf-8"></script>
<script type="text/javascript" src="{lib file=base.js}" charset="utf-8"></script>
<script type="text/javascript"
	src="{lib file=jquery.datetimepicker.full.js}" charset="utf-8"></script>
<script type="text/javascript"
	src="{lib file=jquery-ui.min.js}" charset="utf-8"></script>
<!--[if lt IE 10]>
<script type="text/javascript" src="{lib file=PIE.js}"></script>
<script src="{lib file=html5.js}"></script>
<script src="{lib file=css3-mediaqueries.js}"></script>
<style>
.labalfor txt{left: 0px;top:-2px}
</style>
<![endif]-->
<script type="text/javascript">
(function ($) {
    var oldHTML = $.fn.html;
    $.fn.formhtml = function () {
        if (arguments.length) return oldHTML.apply(this, arguments);
        $("input,textarea,button", this).each(function () {
            this.setAttribute('value', this.value);
        });
        $(":radio,:checkbox", this).each(function () {
            // im not really even sure you need to do this for "checked"
            // but what the heck, better safe than sorry
            if (this.checked) this.setAttribute('checked', 'checked');
            else this.removeAttribute('checked');
        });
        $("option", this).each(function () {
            // also not sure, but, better safe...
            if (this.selected) this.setAttribute('selected', 'selected');
            else this.removeAttribute('selected');
        });
        return oldHTML.apply(this);
    };

    //optional to override real .html() if you want
    // $.fn.html = $.fn.formhtml;
})(jQuery);
var l = 1234567;
	$(function() {
		if (window.PIE) {
			$('.rounded').each(function() {
				PIE.attach(this);
			});
		}

		

		$( "#sname" ).autocomplete({
			source: function(request, response) {
                $.ajax({
                    url: "/index.php?app=sl&act=getsl&ty=2",
                    contentType : "application/x-www-form-urlencoded; charset=utf-8",
					data : {
						t : request.term
					},
                    success: function(data) {
                        response($.map($.parseJSON(data), function(item) {
                            return { label: item.sname, value: item.code }
                        }));
                    }
                });
            },
　　　　　	 select: function(event, ui) {
　　　　　		 $("#sname").val(ui.item.label);
             	 $("#CUS_NO").val(ui.item.value);
             	$("#sname").removeClass("form-item-error");
             	 return false;
            },
            change: function( event, ui ) {
            	if(ui.item!=null){
            	 $("#sname").val(ui.item.label);
             	 $("#CUS_NO").val(ui.item.value);
             	$("#sname").removeClass("form-item-error");
            	}else{
            		 $("#sname").val("");
                 	 $("#CUS_NO").val("");
            	}
             	 return false;
            },
            minLength: 0, 
            autoFocus: false, 
		});
		
		$("a[id^='addrow_']").on("click",
				function() {
					var i = $(this).attr("i");
					copyrow(this,i);
					
				});
	});
	
	
	function copyrow(s,i){
		l=l+1;
		var row = $(s).parent().parent().formhtml();
		if (i != undefined && i != "" && i != null
				&& row != undefined && row != null && row != "") {
			row = row.replace(new RegExp(i, 'g'), l);
		}
		row = "<tr class=\"itemtr\">" + row + "<tr/>";
		$(s).parent().parent().after(row);

		$("#QTY_" + l).click(function(){
			$(this).removeClass("form-item-error");
		}).keydown(function(){
			$(this).removeClass("form-item-error");
		});
		$("#SHIP_OVOY_" + l).click(function(){
			$(this).removeClass("form-item-error");
		}).keydown(function(){
			$(this).removeClass("form-item-error");
		});
		$("#OVOY_" + l).click(function(){
			$(this).removeClass("form-item-error");
		}).keydown(function(){
			$(this).removeClass("form-item-error");
		});
		$("#TD_NO_" + l).click(function(){
			$(this).removeClass("form-item-error");
		}).keydown(function(){
			$(this).removeClass("form-item-error");
		});
		$("#USE_DD_" + l).click(function(){
			$(this).removeClass("form-item-error");
		}).keydown(function(){
			$(this).removeClass("form-item-error");
		});

		$("#box_" + l).click(function() {
			checkedNum();
		});
		
		$("a[id^='addrow_']").off("click");
		
		$("a[id^='addrow_']").on("click",
				function() {
					var ii = $(this).attr("i");
					copyrow(this,ii);
					
				});
	}
</script>
{$_head_tags}

<style>
.barleft {
	height: 700px;
}

.ysleft {
	width: 377px;
	height: 377px;
	border: 1px solid #cccccc;
	margin: 30px 50px 50px 20px;
	text-align: center;
	line-height: 347px;
	overflow: hidden;
}

.ysleft img {
	height: 114px;
	width: 114px
}

.ysright {
	width: 580px;
	font-size: 14px;
	color: #999
}

.ysright h1 {
	font-weight: bold;
	color: #333;
	font-size: 22px;
	margin-bottom: 20px
}

.labal {
	width: 100px;
}

.labalrow {
	height: 51px;
	line-height: 51px
}

.labalfor {
	margin-top: 10px
}

.labalfor li {
	float: left;
	width: 80px;
	height: 30px;
	line-height: 30px;
	text-align: center;
	border: 1px solid #ccc;
	margin-right: 10px;
	cursor: pointer;
	margin-bottom: 10px;
}

.btn-register {
	width: 200px;
	height: 54px;
	color: #fff;
	background: #3e7fc2;
	border: 0;
	font-size: 16px;
	font-family: "Microsoft YaHei", "Hiragino Sans GB";
	cursor: pointer;
}

.form-item-error {
	border: solid 1px #e22 !important;
}

.tlist {
	width:100%;
	font-size: 14px;
	background-color: #fff;
	text-align: center;
	border-spacing: 0;
	width: 575px
}

.tlist th {
	background: #f4f5f9;
	height: 40px;
	line-height: 40px;
	text-align: center;
	font-weight: normal;
	color: #222;
	white-space: nowrap;
}

.tlist td {
	height: 40px;
	line-height: 40px;
	text-align: center;
	white-space: nowrap;
	color: #8d8d8d;
}

.tlist input[type='checkbox'],#checkall {
	border: 0px;
	width: 18px;
	height: 18px;
	border: solid 1px #cfd1d3;
	vertical-align: middle;
}

.mcontent {
	width: 400px;
	height: 150px;
	background: #fff;
	margin: 0 auto;
	position: absolute;
	top: 50%;
	left: 50%;
	margin-top: -75px;
	margin-left: -200px;
	border-radius: 3px;
	-moz-border-radius: 3px;
	-webkit-border-radius: 3px;
}

.mfoot a {
	position: absolute;
	width: 50%;
	bottom: 0;
	text-align: center;
	height: 50px;
	line-height: 50px;
	font-size: 14px;
	color: #fff
}

.q {
	right: 0;
	background: #3e7fc2;
}

.mfoot a:hover {
	font-size: 18px;
	text-decoration: none
}

.c {
	background: #ccc
}

.mhead {
	font-size: 16px;
	text-align: center;
	line-height: 100px
}

.labal {
	width: 100px;
}

.labalrow {
	height: 42px;
	line-height: 42px;
	font-size: 14px;
	color: #999
}

.labalfor {
	margin-top: 10px
}

.labalfor li {
	float: left;
	width: 80px;
	height: 30px;
	line-height: 30px;
	text-align: center;
	border: 1px solid #ccc;
	margin-right: 10px;
	cursor: pointer;
	margin-bottom: 10px;
}
.ui-menu .ui-menu-item {
    font-size: 14px;
   
    padding: 2px;
}
</style>
</head>
<body>
	<div id="syss" class="syss rounded">操作成功</div>
	<div id="syse" class="syse rounded">操作失败</div>
	<div class="mask" id="mask">
		<div class="mcontent">
			<div class="mhead">确认要取消此要箱？</div>
			<div class="mfoot">
				<a href="javascript:;" class="c" id="c">取消</a> <a
					href="javascript:;" class="q" id="q">确定</a>
			</div>
		</div>
	</div>
	<div class="topbar">
		<div class="w">
			<div class="fr">
				<!--{if !$visitor.user_id}-->
				<a href="{url app=member&act=login&ret_url=$ret_url}"
					style="color: #C81623">请登录</a>
				<div class="spacer"></div>
				<a href="{url app=member&act=register&ret_url=$ret_url}">免费注册</a>
				<!--{else}-->

				欢迎您登陆!&nbsp;&nbsp;{$visitor.real_name|escape}

				<div class="spacer"></div>
				<a href="{url app=member&act=setpwd}">修改密码</a>
				<div class="spacer"></div>
				<a href="{url app=member&act=logout}">{$lang.logout}</a>
				<!--{/if}-->
			</div>

			<div class="cl"></div>
		</div>
	</div>
	<div style="position: relative;" class="submain">
		<div class="w">
			<div id="logoindex" class="fl">
				<a href="index.php"><img
					src="themes/mall/default/styles/default/images/logo1.png"> </a>
			</div>
			<ul class="navbar fr" style="position: relative;">
				<li><a href="index.php"><p>首页</p> </a></li>
				<li><a href="index.php?app=fx" class="on"><p>业务管理</p> </a></li>
				<li><a href="index.php?app=fx&act=cw"><p>账务管理</p> </a></li>
				<li style="display: none"><a href="javascript:;"><p>客户管理</p> </a></li>
			</ul>
			<div class="cl"></div>
		</div>
		<div class="cl"></div>
	</div>
	<style>
	
	</style>
	<div class="w">
		<div class="fl w150 barleft">
			<ul class="navbarleft">
			<li><a href="index.php?app=fx" class="on">日放箱申请</a></li>
				<li><a href="index.php?app=fx&act=hz" >日放箱汇总</a></li>
				
			</ul>
			<div class="cl"></div>
		</div>
		<style>
.nc {
	height: 20px;
	width: 20px;
	background: #ff6600;
	-webkit-border-radius: 3px;
	-moz-border-radius: 3px;
	border-radius: 3px;
}

.cc {
	background: url('/themes/mall/default/styles/ok.png') no-repeat center
		center;
	background-color: #ff6600;
}
#sname{    font-weight: bold;
    color: #333;
    font-size: 22px;
    margin-bottom: 20px;
    font-family: 微软雅黑;
    border: 1px solid #ccc;
    width: 393px;
    padding: 0 10px;
    height: 40px;
    line-height: 40px;
    background: url(/images/d.png) no-repeat 412px center;padding-right: 45px}
    .ui-menu {
    background: #ededed;
    max-height: 400px;
    overflow: auto;
}
.itemtr select {
	border: 1px solid #e7e7eb;
	width: 70px;
	padding: 5px
}

.itemtr input[type='text'] {
	border: 1px solid #e7e7eb;
	padding: 0 5px;
	width: 40px;
	height: 28px;
	line-height: 28px;
	text-align: center;
}
.ii{width: 200px !important; text-align: left;}
.iii{width: 150px !important; }
.iiii{width: 100px !important; text-align: left; }
</style>
		<script>
		$(function(){
			$("#ncdiv").click(function(){
				var j=$("#jj_flag").val();
				if(j==""){
					$("#jj_flag").val("Y");
					$("#nc").addClass("cc");
				}else{
					$("#jj_flag").val("");
					$("#nc").removeClass("cc");
				}
			});
		});
		</script>
		<div class="fl w800 barright">
			<form action="" id="ys-form" method="get">
				<input type="hidden" name="app" value="fx" /> <input type="hidden"
					name="act" value="yd" /> <input type="hidden" name="id" id="sid"
					value="{$s.sid}" /> <input type="hidden" name="CUS_NO" id="CUS_NO"
					value="{$s.code}" /> <input type="hidden" name="XX" id="XX"
					value="{$tt}" /> 

				<div class="">
					<h1>
						<input type="text" value="{$s.sname}" id="sname" o="{$s.sname}" placeholder="请输入船公司编码或名称">
						
					</h1>
					
					
					<div class="labalrow">
						<div class="fl labal">船名：</div>
						<div class="fl labalfor">
							<input type="text" name="SHIP_OVOY" id="SHIP_OVOY"
								class="fl SHIP_OVOY" placeholder="请输入船名" />
						</div>
						<div class="fl labal" style="margin-left: 30px">航次：</div>
						<div class="fl labalfor">
							<input type="text" name="OVOY" id="OVOY" class="fl SHIP_OVOY"
								placeholder="请输入航次" />
						</div>
					</div>
					<div class="labalrow">
						<div class="fl labal">用箱要求：</div>
						<div class="fl labalfor">
							<input type="text" name="REM" id="REM" class="fl REM"
								placeholder="请用箱要求" />
						</div>
					</div>
<div class="cl"></div>
<div class="ship_area" style="margin-top: 20px;margin-bottom: 20px">
						
						<table class="tlist">
							<tr>
								<th style="width: 10px"></th>
								<th>关单号</th>
								<th>箱型</th>
								<th>箱量</th>								
								<th style="width: 40px"></th>
							</tr>							
							<tr class="itemtr">
								<td>
								</td>
								<td><div>
										<input type="text" value="" name="his[ASDFR][TD_NO]" id="TD_NO_ASDFR" item="ASDFR" class="ii"/>
									</div></td>
								<td><select name="his[ASDFR][XX]" id="XX_ASDFR"  class="iii">
										{foreach from=$type item=t}
										<option value="{$t.d_value}"
											{if $p.XX==$t.d_value}selected{/if}>{$t.d_value}</option>
										{/foreach}
								</select></td>
								<td><input type="text" value="1"
									name="his[ASDFR][QTY]" id="QTY_ASDFR"  class="iiii" /></td>
								
								<td><a title="复制本行" href="javascript:;" class="addrow"
									id="addrow_ASDFR" i="ASDFR"></a></td>
							</tr>
						</table>
						
						<div class="cl"></div>
					</div>
<div class="cl"></div>
					<div class="labalrow">
						<div class="fl labal"></div>
						<div class="fl labalfor">
							<button type="button" class="btn-register" id="btn-submit">确认申请</button>
						</div>
					</div>
				</div>



			</form>
			<style>
.f {
	width: 50%;
	border-bottom: 5px solid #3e7fc2;
	float: left;
}

.nf {
	width: 50%;
	border-bottom: 5px solid #cccccc;
	float: left;
}

.b {
	color: #3e7fc2 !important
}

.bdiv {
	width: 80%;
	margin: 0 auto
}

.h1 {
	border-bottom: 3px solid #ccc;
	height: 40px;
	line-height: 40px;
	font-size: 16px;
	color: #3e7fc2;
}

.h2 {
	border-bottom: 3px solid #3e7fc2;
	float: left;
}

.ship_area {
	overflow-y: auto;
	overflow-x: hidden;
	padding-right: 15px;
	margin-top: 0;
	width: 100%;
}

.ship_area a {
	margin: 0;
}

.datanone {
	width: 355px;
}
</style>
			
		
		
		</div>
	</div>
<div class="cl"></div>
	<div class="w">
		<div id="footer-2013" style="margin-top: 50px">

			<div class="copyright">
				Copyright&copy;2004-2020&nbsp;&nbsp;普捷通&nbsp;版权所有</div>
				<div style="width:300px;margin:0 auto;">
		 		<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=31011502002931" style="display:inline-block;text-decoration:none;height:20px;line-height:20px;"><img src="/themes/mall/default/ba.png" style="float:left;"/><p style="float:left;height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:#939393;">沪公网安备 31011502002931号</p></a>
		 	</div>
		</div>
	</div>
	<script type="text/javascript">
		seajs.use('/includes/libraries/javascript/fx.js', function(fx) {
			fx.init();
		});
	</script>
</body>
</html>